
		var storageSe = window.sessionStorage;  
		var tokenk=document.getElementById('token_user').value;
		
	function verify()
	{
		var  token=storageSe.getItem('token');
		if(!token)
		{	
			_getToken();
		}else
		{
			_veirfyFromServer(token);
		}
	}
	verify();

	function _veirfyFromServer(token)
	{
		var  data={token:token};
		var  verifyUrl="http://admin.chinlingcloud.com/index/index/getVerifyToken";
		$.ajax({
        	type:"post",
        	url:verifyUrl,
			data: data,
        	async:true,
        	success: function(res){
				var res=JSON.parse(res);
				console.log(res);
               var valid=res.states;
				if(!valid)
				{
					_getToken();
				}
            }
        });
	}
	function _getToken()
	{
		storageSe.setItem("token", tokenk);
	}
    

